function res = GetXe129T1Rho(obj, duration, durationDecay, varargin)
    p=inputParser;
    p.addRequired('duration', @(x) x>=0);
    p.addRequired('durationDecay', @(x) x>=0);
    p.addParameter('amplitude', 1.0, @(x) x>0.0 && x<=2.0);
    p.addParameter('detuning', 0.0, @isnumeric);
    p.addParameter('preDrivingTime', 10.0, @(x) x>0);
    p.addParameter('calibrationField', 0.1, @(x) x>0.0);
    p.addParameter('sign', 1, @(x) ismember(x, [-1 1]));
    p.addParameter('rate', 50, @(x) x>0);
    p.addParameter('isReport', false, @islogical);
    p.addParameter('isPlot', true, @islogical);
    p.addParameter('description', 'No Description.', @ischar);
    p.parse(duration, durationDecay, varargin{:});
    
    try
        freq129 = obj.SystemInfo.Xe129FID.f129;
    catch
        error('Cannot get Central frequency.');
    end
    
    tm = timer('ExecutionMode', 'singleShot', 'StartDelay', p.Results.preDrivingTime);
    tm.TimerFcn = @(myTimerObj, thisEvent) drvXe(obj, myTimerObj, freq129 + p.Results.detuning, p.Results.amplitude, p.Results.calibrationField);
    start(tm);
    
    %%
    obj.UnlockXe129(); obj.UnlockXe131();
    obj.setRFMagnetometer('field', obj.SystemInfo.MainField.bz0);
    obj.rbSignal.unsubscribe_signal();
    obj.rbSignal.subscribe_signal(ziDemodTime.R, [2 1 1]);
    obj.rbSignal.subscribe_signal(ziDemodTime.Theta, [2 1 2]);
    t1rhoSignal = obj.rbSignal.getDemodSignal(p.Results.duration, 'rate', p.Results.rate);

    obj.by129.disableDriver();
    exchangePumpSignal = obj.rbSignal.getDemodSignal(p.Results.durationDecay, 'rate', p.Results.rate);
    fitting = obj.FitXe129T1Rho(t1rhoSignal, exchangePumpSignal, tm.UserData, varargin{:});    

    res.timestamp = datetime('now');
    res.signal.T1Rho = t1rhoSignal;
    res.signal.Pump = exchangePumpSignal;
    res.fitting = fitting;
    res.T1rho = fitting.result.tau;
    res.XeField = fitting.result.a;
    res.PumpTime = fitting.resultPump.tau;
    res.parameter.amplitude = p.Results.amplitude;
    res.parameter.detuning = p.Results.detuning;
    res.parameter.calibration = p.Results.calibrationField;
    res.parameter.toc = tm.UserData;
    obj.SystemInfo.Xe129T1Rho = res;

    %%
    delete(tm);
    
    %%
    if p.Results.isPlot
        fig = obj.PlotXe129T1Rho();
    end
    %%
    if p.Results.isReport
        getReporter;
        rpt.NewRecord(['Xe129T1Rho_' p.Results.description]);
        if p.Results.isPlot
            rpt.AppendFigure(fig, sprintf('Xe129T1Rho %s', p.Results.description));
        end
    end
    
    getSession;
    sess.addData('Xe129T1Rho', res, p.Results.description);
end

function drvXe(obj, timerObj, freq, amp, calibration)
    tic;
    obj.bz0.setDC( obj.SystemInfo.MainField.bz0 + calibration); pause(2.0);
    t1 = toc;
    obj.bz0.setDC( obj.SystemInfo.MainField.bz0); pause(1.0);
    t2 = toc;
    obj.bz0.setDC( obj.SystemInfo.MainField.bz0 - calibration); pause(2.0);
    t3 = toc;
    obj.bz0.setDC( obj.SystemInfo.MainField.bz0); pause(1.0);
    t4 = toc;
    obj.by129.setAC('frequency', freq, 'amplitude', amp, 'range', 10.0); 
    timerObj.UserData = [t1, t2, t3, t4];
end
